<html>
<#include "../common/header.ftl">
<body>
<div id="wrapper" class="toggled">
    <#--        边栏sidebar-->
    <#include "../common/nav.ftl">
    <#--        主要内容content-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form role="form" method="post" action="/cumthing/seller/product/save">
                        <div class="form-group">
                            <label >名称</label>
                            <input name="productName" type="text" class="form-control" value="${(productInfo.productName)!''}" />
                        </div>

                        <div class="form-group">
                            <label >价格</label>
                            <input name="productPrice" type="text" class="form-control" value="${(productInfo.productPrice)!''}" />
                        </div>

                        <div class="form-group">
                            <label >库存</label>
                            <input name="stock" type="number" class="form-control" value="${(productInfo.stock)!''}" />
                        </div>

                        <div class="form-group">
                            <label >描述</label>
                            <input name="productDescription" type="text" class="form-control" value="${(productInfo.productDescription)!''}" />
                        </div>

                        <div class="form-group">
                            <label >主图</label>
                            <img height="100" width="100" src="${(productInfo.mainImage)!''}" alt="">
                            <input name="mainImage" type="text" class="form-control" value="${(productInfo.mainImage)!''}" />
                        </div>

                        <div class="form-group">
                            <label >副图</label>
                            <img height="100" width="100" src="${(productInfo.subImages)!''}" alt="">
                            <input name="subImages" type="text" class="form-control" value="${(productInfo.subImages)!''}" />
                        </div>

                        <div class="form-group">
                            <label >类目</label>
                            <select name="parentId" class="form-control">
                                <#list productCategoryList as category>
                                    <option value="${category.parentId}"
                                            <#if (productInfo.parentId)?? &&productInfo.parentId ==category.parentId>
                                                selected
                                            </#if>
                                        >${category.categoryName}
                                    </option>
                                </#list>
                            </select>
                        </div>
                        <input hidden type="text" name="id" value="${(productInfo.id)!''}">
                        </div> <button type="submit" class="btn btn-default">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
